home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
edit
/
aurora2.zip
/
VIEWMEM.AML
< prev
next >
Wrap
Text File
|
1995-01-26
|
1KB
|
63 lines
// ───────────────────────────────────────────────────────────────────
// The Aurora Editor v2.0
// Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
//
// View DOS memory
//
// This macro reads a user-specified portion of DOS memory into a
// text buffer for viewing/editing (demonstrates the use of the AML
// 'peek' function).
//
// Note: the address specified is "absolute", not segmented. For example,
// 095A:0943 would be specified as: ((095Ah x 16) + 943h) = 9EE3h (40675)
// ───────────────────────────────────────────────────────────────────
include bootpath "define.aml"
// make line length 64 bytes
define
set linelength 64
end
var total_bytes
// prompt the user for address and length
address = ask "Enter memory address"
length = ask "Number of bytes to read"
if not length then
return
end
if address == ' ' then
address = 0
end
// create new binary buffer
buffer = createbbuf
while total_bytes < length do
// get mem contents and insert into buffer
insline (peek address linelength)
// move to the last line in the buffer
down 1
// setup to read next memory location
address = address + linelength
// total up bytes read
total_bytes = total_bytes + linelength
end
// delete blank first line
delline 1 1
// edit the new buffer in a window
setbufname (qualify "TEMP.TXT" (getbufname))
openbuf buffer